﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
void left_turn(char* s, int k)
{
    char tmp[100] = { '\0' };
    int i = 0, j = 0, len = strlen(s);
    while (i < k)
    {
        tmp[j++] = s[i++];
    }
    int t = 0;
    while (i < len)
    {
        s[t++] = s[i++];
    }
    j = 0;
    while (t <len)
    {
        s[t++] = tmp[j++];
    }
    s[t] = '\0';
}

int main() 
{
    char s[100] = "ABCD";
    left_turn(s, 2);
    printf("%s", s);
    return 0;
}
